<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover" />
    <title>申请等待</title>
    <link rel="stylesheet" href="{{asset('/addons/jquery-weui-build/css/weui.min.css')}}">
    <link rel="stylesheet" href="{{asset('/addons/jquery-weui-build/css/jquery-weui.css')}}">
    <link rel="stylesheet" href="{{asset('/css/system/iconfont.css')}}">
    @if($skinid == 3)
        <link rel="stylesheet" href="/css/system/common.css">
        <link rel="stylesheet" href="/css/system/cancle-apply.css?v=2019060401">
    @else
        <link rel="stylesheet" href="/css/theme-blue/system/common.css">
        <link rel="stylesheet" href="/css/theme-blue/system/cancle-apply.css?v=2019060401">
    @endif
    @include('sysadmin.head')
</head>
<body ontouchstart>
<div class="mian-container">
    <div class="colleague-verifice">
        <div class="confirm-bk">
            <img src="{{"/uploads/images/company-logo/".$company->corpid.".png"}}">
            <h3>{{$company->name}}</h3>
            <p>{{$company->slogan}}</p>
        </div>
        <a href="javascript:void(0);" class="apply-btn">申请中</a>
        <a href="javascript:void(0);" class="apply-btn cancle-apply">撤销申请</a>
        <input type="hidden" name="applyid" value="{{$apply->id}}">
        {!! csrf_field() !!}
        <a href="{{url('/front/user-logout')}}" class="apply-out">
            <img src="/img-theme-blue/login-out.png">
            退出登录
        </a>
    </div>
</div>
<script src="{{asset('/kaohe/js/jquery-2.1.4.min.js')}}"></script>
<script src="{{asset('/addons/jquery-weui-build/js/fastclick.js')}}"></script>
<script>
    $(function() {
        document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
        FastClick.attach(document.body);
    });
</script>
<script src="{{asset('/addons/jquery-weui-build/js/jquery-weui.min.js')}}"></script>
<script>
    $(document).ready(function () {
        $('.cancle-apply').click(function () {
            var applyid = $('input[name=applyid]').val();
            var token = $('input[name=_token]').val();
            $.ajax({
                url:'/front/cancel-apply?_token='+token,
                type:'post',
                dataType:'json',
                data:{'applyid':applyid},
                error: function (request) {
                    $.toast('网络错误',"text");
                },
                success: function (data) {
                    if (data.status == 'success') {
                        $.toast(data.msg);
                        setTimeout(function(){ window.location.href=data.redirectUrl; }, 1000);
                    } else {
                        $.toast(data.msg,"text");
                    }
                },
            });
        })
    })
</script>
</body>
</html>